﻿@{Layout = "~/Views/Shared/_Layout.cshtml";}
<h1>Add booking request</h1>
@{
    if (ViewData.Model != null)
    {
        if (ViewData.Model.GetType() == typeof(string))
        {
            <div class='Error'>@ViewData.Model</div>
        }
    }
}
<form method="post">
    <table class="Form">
        <tr>
            <th>User Initials</th>
            <td><input type="text" name="inUser" value="@ViewData["UserID"]" disabled="disabled" /></td>
        </tr>
        <tr>
            <th>Course instance ID</th>
            <td>@Html.DropDownList("inCourseInstanceID", Scheduling.Models.Helpers.CourseInstanceHelper.GetCourseInstances(), new { Size = "1"})</td>
        </tr>
  <!--      <tr>
            <th>Year</th>
            <td><input type="text" name="inYear" value="@ViewData["Year"]" /></td>
        </tr>
        -->
        <tr>
            <th>Start period</th>
            <td><select name="inStartPeriod">
                  <option value="1">1</option>
                  <option value="2">2</option>
                  <option value="3">3</option>
                  <option value="4">4</option>
                  <option value="5">5</option>
                </select></td>
        </tr>
        <tr>
            <th>Preferred start time</th>
            <td>@Html.DropDownList("inStartTime", Scheduling.Models.Helpers.SchedulingHelper.GenerateBookingStartTimes(), new { Size = "1", Style = "width:60px;" })</td>
        </tr>
    </table>
    <table class="Form">
        <tr>
            <th>Days of week*</th>
        </tr>
        <tr>
                <td><input type="checkbox" name="inMonday" value="inMonday" />  Monday</td> 
                <td><input type="radio" name="inMondayDayType" value="Every" checked="checked"/>  Every
                <input type="radio" name="inMondayDayType" value="Even"/>  Even
                <input type="radio" name="inMondayDayType" value="Odd"/>  Odd</td>
        </tr>
        <tr>
                <td><input type="checkbox" name="inTuesday" value="inTuesday" />  Tuesday</td>
                <td><input type="radio" name="inTuesdayDayType" value="Every" checked="checked"/>  Every
                <input type="radio" name="inTuesdayDayType" value="Even"/>  Even
                <input type="radio" name="inTuesdayDayType" value="Odd"/>  Odd</td>
        </tr>
        <tr>
                <td><input type="checkbox" name="inWednesday" value="inWednesday" />  Wednesday</td>
                <td><input type="radio" name="inWednesdayDayType" value="Every" checked="checked"/>  Every
                <input type="radio" name="inWednesdayDayType" value="Even"/>  Even
                <input type="radio" name="inWednesdayDayType" value="Odd"/>  Odd</td>
        </tr>
        <tr>
                <td><input type="checkbox" name="inThursday" value="inThursday" />  Thursday</td>
                <td><input type="radio" name="inThursdayDayType" value="Every" checked="checked"/>  Every
                <input type="radio" name="inThursdayDayType" value="Even"/>  Even
                <input type="radio" name="inThursdayDayType" value="Odd"/>  Odd</td>
        </tr>
        <tr>
                <td><input type="checkbox" name="inFriday" value="inFriday" />  Friday</td>
                <td><input type="radio" name="inFridayDayType" value="Every" checked="checked"/>  Every
                <input type="radio" name="inFridayDayType" value="Even"/>  Even
                <input type="radio" name="inFridayDayType" value="Odd"/>  Odd</td>
        </tr>
        <tr>
            <th>Number of lectures*</th>
            <td><input type="text" name="inLectureCount" value="@ViewData["inLectureCount"]" /></td>
        </tr>
        <tr>
            <th>Lecture length</th>
            <td><select name="inLectureLength">
                  <option value="2">2</option>
                  <option value="4">4</option>
                  <option value="6">6</option>
                  <option value="8">8</option>
             </select> hrs</td>
        </tr>
    </table>
    <table class="Form">
        <tr>
            <th>Preferred room</th>
            <td><input type="text" name="inRoomPattern" value="@ViewData["inRoomPattern"]" /></td>
        </tr>
        <tr>
            <th>Required room capacity*</th>
            <td><input type="text" name="inRequiredCapacity" value="@ViewData["inRequiredCapacity"]" /></td>
        </tr>
        <tr>
            <th>Room type</th>
            <td>@Html.DropDownList("inRoomType", Scheduling.Models.Helpers.RequestHelper.GetRoomTypes(), new { Size = "1", Style = "width:120px;" })</td>
        </tr>
        <tr>
            <th>Prioritize booking by</th>
            <td>@Html.DropDownList("inPriority", Scheduling.Models.Helpers.RequestHelper.GetBookingPriorities(), new { Size = "1", Style = "width:120px;" })</td>
        </tr>
        
      </table>
    <input class="Button" type="submit" value="Send request" />
    <p><i> Fields marked with * are mandatory </i></p>
</form><br />

@Html.ActionLink("Back", "../Booking/List")
